package com.easylinkin.linkappapi.grid.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.easylinkin.linkappapi.grid.entity.GridReportDay;
import com.easylinkin.linkappapi.grid.entity.GridReportDayDetail;
import com.easylinkin.linkappapi.grid.entity.GridReportDayUser;
import com.easylinkin.linkappapi.grid.models.dto.GridReportDayUserSaveDTO;
import com.easylinkin.linkappapi.grid.models.vo.GridReportDayUserInfoVO;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 网格日报人员指定表 服务类
 *
 * @author kuyujie
 * @since 2024-05-16
 */
public interface IGridReportDayUserService extends IService<GridReportDayUser> {
    /**
     * 保存数据
     *
     * @param gridReportDay
     * @param userList
     * @author kyj
     * @date 2024/5/17 10:45
     */
    boolean saveData(GridReportDay gridReportDay, List<GridReportDayUserSaveDTO> userList);

    /**
     * 根据日报id查询填报人员
     *
     * @param reportId
     * @return List<GridReportDayUserInfoVO>
     * @author kyj
     * @date 2024/5/17 19:09
     */
    List<GridReportDayUserInfoVO> listByReportId(Long reportId, LocalDateTime submitDeadline);

    /**
     * 根据日报id用户id获取填报人
     *
     * @param reportId
     * @param userId
     * @return GridReportDay
     * @author kyj
     * @date 2024/5/21 11:32
     */
    GridReportDayUser getByReportIdUserId(Long reportId, String userId);

    /**
     * 填报时间更新
     *
     * @param reportDayDetail
     * @return boolean
     * @author kyj
     * @date 2024/5/21 11:49
     */
    boolean updateSubmit(GridReportDayDetail reportDayDetail);
}